<?php
/**
 * Created by PhpStorm.
 * User: Hwy
 * Date: 2018/8/18
 * Time: 22:18
 */

namespace app\index\controller;

use app\common\logic\WechatCommonLogic;
use think\Db;

class Weixin
{
    /**
     * 信息处理
     */
    public function index(){
        $config = Db::name('wx_info')->find();
        if($config['wait_access'] == 0) {
            ob_clean();
            exit($_GET["echostr"]);
        }

        $wechatCommon = new WechatCommonLogic($config);
        $wechatCommon->handleMessage();

    }
}